﻿﻿﻿﻿﻿
<!DOCTYPE HTML>
<html>

<head>
	<meta charset="utf-8">
	<meta name="renderer" content="webkit|ie-comp|ie-stand">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
	<meta http-equiv="Cache-Control" content="no-siteapp" />
	<link rel="Bookmark" href="/favicon.ico">
	<link rel="Shortcut Icon" href="/favicon.ico" />
	<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5shiv.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<![endif]-->
	<link rel="stylesheet" type="text/css" href="../static/h-ui/css/H-ui.min.css" />
	<link rel="stylesheet" type="text/css" href="../static/h-ui.admin/css/H-ui.admin.css" />
	<link rel="stylesheet" type="text/css" href="../lib/Hui-iconfont/1.0.9/iconfont.css" />
	<link rel="stylesheet" type="text/css" href="../static/h-ui.admin/skin/default/skin.css" id="skin" />
	<link rel="stylesheet" type="text/css" href="../static/h-ui.admin/css/style.css" />
	<!--[if IE 6]>
<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
	<title>KVM</title>
	<meta name="keywords" content="KVM">
	<meta name="description" content="KVM">
</head>

<body>
	<header class="navbar-wrapper">
		<div class="navbar navbar-fixed-top">
			<div class="container-fluid cl"> <a class="logo navbar-logo f-l mr-10 hidden-xs" href="../index/index.html">KVM</a>
				<a class="logo navbar-logo-m f-l mr-10 visible-xs" href="../index/index.html">H-ui</a>
				<span class="logo navbar-slogan f-l mr-10 hidden-xs"></span>
				<a aria-hidden="false" class="nav-toggle Hui-iconfont visible-xs" href="javascript:;">&#xe667;</a>

				<nav id="Hui-userbar" class="nav navbar-nav navbar-userbar hidden-xs">
					<ul class="cl">
						<!-- <li  id="menu-0-">
					<a href="#" class="" onclick="adminAdd();"><i class="Hui-iconfont">&#xe607;</i></a>
				</li> -->
						<li class="dropDown dropDown_hover">
							<a href="#" class="dropDown_A" id="adminUserName"> <i class="Hui-iconfont">&#xe6d5;</i></a>
							<ul class="dropDown-menu menu radius box-shadow">
								<!-- <li><a href="#" onclick="updatePwd();">修改密码</a></li> -->
								<!-- 分离，大模块 -->
								<!-- <li><a href="#" onclick="adminAdd()">账号管理</a></li> -->
								<li><a href="#" id="out">退出</a></li>
							</ul>
						</li>
						<li id="Hui-skin" class="dropDown right dropDown_hover"> <a href="javascript:;" class="dropDown_A" title="换肤"><i
								 class="Hui-iconfont" style="font-size:18px">&#xe62a;</i></a>
							<ul class="dropDown-menu menu radius box-shadow">
								<li><a href="javascript:;" data-val="default" title="默认（黑色）">默认（黑色）</a></li>
								<li><a href="javascript:;" data-val="blue" title="蓝色">蓝色</a></li>
								<li><a href="javascript:;" data-val="green" title="绿色">绿色</a></li>
								<li><a href="javascript:;" data-val="red" title="红色">红色</a></li>
								<li><a href="javascript:;" data-val="yellow" title="黄色">黄色</a></li>
								<li><a href="javascript:;" data-val="orange" title="橙色">橙色</a></li>
							</ul>
						</li>
					</ul>
				</nav>
			</div>
		</div>
	</header>
	<aside class="Hui-aside">
		<div id="menu_div" class="menu_dropdown bk_2"></div>
	</aside>
	<div class="dislpayArrow hidden-xs"><a class="pngfix" href="javascript:void(0);" onClick="displaynavbar(this)"></a></div>
	<section class="Hui-article-box">
		<div id="Hui-tabNav" class="Hui-tabNav hidden-xs">
			<div class="Hui-tabNav-wp">
				<ul id="min_title_list" class="acrossTab cl">

					<li class="active">
						<span title="首页" data-href="./index-welcome.html">首页</span>
						<em></em>
					</li>
				</ul>
			</div>
			<div class="Hui-tabNav-more btn-group"><a id="js-tabNav-prev" class="btn radius btn-default size-S" href="javascript:;"><i
					 class="Hui-iconfont">&#xe6d4;</i></a><a id="js-tabNav-next" class="btn radius btn-default size-S" href="javascript:;"><i
					 class="Hui-iconfont">&#xe6d7;</i></a></div>
		</div>
		<div id="iframe_box" class="Hui-article">
			<div class="show_iframe">
				<div style="display:none" class="loading"></div>
				<iframe scrolling="yes" frameborder="0" src="./index-welcome.html"></iframe>
			</div>
		</div>
	</section>

	<input type="hidden" id="adminName" />
	<!--_footer 作为公共模版分离出去-->
	<script type="text/javascript" src="../lib/jquery/1.9.1/jquery.min.js"></script>
	<!-- <script src="./../static/jquery.min.js"></script> -->
	<script type="text/javascript" src="../lib/layer/2.4/layer.js"></script>
	<script type="text/javascript" src="../static/h-ui/js/H-ui.min.js"></script>
	<script type="text/javascript" src="../static/h-ui.admin/js/H-ui.admin.js"></script>
	<!--/_footer 作为公共模版分离出去-->
	<script type="text/javascript" src="../static/js/common.js"></script>

	<!--请在下方写此页面业务相关的脚本-->
	<script type="text/javascript">
		// //调取动态菜单
		$(function () {

			if (!window.sessionStorage.getItem(pj_name + '-token')) {
				location.href = "./../index/login.html"
			}

			var storge = window.sessionStorage.getItem(pj_name + '-suser');
			var data = eval('(' + storge + ')');
			var token = window.sessionStorage.getItem(pj_name + '-token');
			$.ajax({
				type: "post",
				xhrFields: { withCredentials: true },
				data: { token: token, tokenUserId: data.id, userId: data.id, pid: 0 },
				url: admin_url + '/scaSysUser/getUserMenuList',
				success: function (data) {
					// var data = eval('('+data+')');
					if (data.code == 199) {
						layer.msg(data.msg, {
							time: 1000
						})
					} else if (data.code == 801) {
						layer.msg("页面过期，请重新登录", {
							end: function () {
								location.href = "./../index/login.html"
							}
						})

					}
					else if (data.code == 200) {
						var top = '&#xe6d5;'
						// 添加动态菜单
						var data = data.data[0].children;
						var dl = '';
						var dd = '';
						for (var i = 0; i < data.length; i++) {
							dl = '<dl><dt class = "open2"><i class="Hui-iconfont ' + data[i].icon + '" ></i>&nbsp;&nbsp;' + data[i].name + '<i class="Hui-iconfont menu_dropdown-arrow">' + top + '</i><dd><ul class="list"></ul></dd></dt></dl>'
							$("#menu_div").append(dl);
							// var child = data[i].children;
							if (data[i].children == '' || data[i].children == null || !data[i].children) {

							} else {
								for (var k = 0; k < data[i].children.length; k++) {
									dd = '<li><a data-href=' + data[i].children[k].url + ' data-title=' + data[i].children[k].name + ' href="javascript:void(0)">' + data[i].children[k].name + '</a></li>'
									$(".list").eq(i).append(dd);
								}
							}

						}
					}
					// hui-admin 动态加载菜单之后会让展开效果失效，官网推出的方法。
					$(".Hui-aside").Huifold({
						titCell: '.menu_dropdown dl dt',
						mainCell: '.menu_dropdown dl dd',
					});
				},error:function(data){
                    layer.msg("页面过期，请重新登录", {
							time: 1000,
							end: function () {
								location.href = "./../index/login.html"
							}
						})
                }
			})

		})

		function hrefCheckAuth(type) {
			var href = "";
			var name = "";
			if (type == 0) {
				href = "../currency/recharge.html";
				name = "充值";
			} else if (type == 1) {
				href = "../guild/guild-give-add.html";
				name = "矿机赠送";
			}
			openCheckPwd(href, name);
		}

		function openCheckPwd(href, name) {
			layer.prompt({ title: '请输入验证密码，点击确认', formType: 1 }, function (pwd, index) {
				if (pwd != "") {
					$.ajax({
						type: "POST", //用post方式传输
						xhrFields: { withCredentials: true },
						url: admin_url + "/user/post/checkSecondaryPwd",
						data: { token: window.localStorage.aic_admin_token, tokenUserId: window.localStorage.aic_admin_id, pwd: pwd },
						success: function (data) {
							var data = eval('(' + data + ')');
							if (data.status == 1) {
								layer.close(index);
								creatIframe(href, name);
							} else if (data.status == 2) {
								layer.msg("密码错误！", {
									time: 300,
									end: function () {
										openCheckPwd(href, name);
									}
								})
							}
						}
					});
				}
			});
		}
		function adminAdd() {
			if ($("#min_title_list").html().indexOf("添加管理员") == -1) {
				creatIframe("../admin/admin-add.html", "添加管理员");
			}
		}
		$(function () {
			//检查是否登陆
			request_ajax("POST", admin_url + "/scaSysUser/getCurLoginSysUser", undefined, function (result) {
				if (result.data == null) {
					$(location).attr('href', '../index/login.html');
				}
				//获取授权菜单
				var data = {
					"userId": result.data.id,
					"pid": 1,
					"loadAll": 1
				}
				$("#adminUserName").html('您好,' + result.data.userName)
				request_ajax("POST", admin_url + "/scaSysUser/getUserMenuList", data, function (result) {
					if (result.code == 200) {
						var list = result.data;
						for (var i = 0; i < list.length; i++) {

						}
					}
				});
			});
		});

		function updatePwd() {
			layer.open({
				type: 2,
				title: '修改密码',
				area: ['500px', '330px'],
				content: "../admin/update-pwd.html"
			});
			$("#adminName").val($("#adminUserName").html());
		}
		$("#out").click(function () {
			layer.msg('确认注销当前账号', {
				time: 0,
				btn: ['确定', '取消'],
				yes: function (index, layero) {
					// 注销登录接口
					$.ajax({
						type: "POST", //用post方式传输
						xhrFields: { withCredentials: true },
						url: admin_url + "/scaSysUser/getCurLoginSysUser",
						success: function (data) {
							window.location.href = "./login.html"
						}
					})
				}
			});
		})

	</script>


</body>

</html>